﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Sales_Product_Add.aspx.cs" Inherits="JKF.Web.Sales.Sales_Product_Add" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <%= RegScript("~/js/jquery.1.5.js")%>
    <%=RegScript("~/js/Common.js")%>
    <%=RegScript("~/js/jquery.json.js")%>
    <%=RegScript("~/js/jquery.nhis.js")%>
    <%=RegScript("~/js/jquery.rchis.js")%>
    <%=RegScript("~/js/jquery.validate.js")%>
    <%=RegScript("~/js/DatePicker/WdatePicker.js")%>
    <%=RegStyle("~/js/suggest/jquery.suggest.css")%>
    <%=RegStyle("~/App_Themes/Theme2/Include.css")%>
    <style type="text/css">
        body { height: auto; }
    </style>
    <script type="text/javascript">
        var module = "<%=module%>";
        var customerKey = "<%=identifierKey%>";
        $(function () {
            var Tabs = {
                contract: "Contract/Sales_Contract_Add.aspx?contractKey=",
                consume: "Consume/Sales_Consume_Add.aspx?consumeKey=",
                nutrition: "Nutrition/Sales_Nutrition_Add.aspx?nutritionKey="
            };
            $(".tabs").find("li").click(function () {
                $(".tabs").find("li").removeClass("selectTag");
                $(this).addClass("selectTag");
                $("iframe").css("display", "none");
                $("#" + $(this).attr("md")).css("display", "");
            });
            var modName = "";
            //debugger;
            if (module && $.trim(module) != "") {
                var selMod = $(".tabs").find("li[md='" + module + "']");
                if (selMod.size() > 0) {
                    selMod.eq(0).click();
                    //mode 存在
                    modName = module;
                }
            }
            for (var s in Tabs) {
                if (customerKey && customerKey.length > 10) {
                    if (modName != "" && modName && s == modName) {
                        $("#" + s).attr("src", Tabs[s] + customerKey);
                    } else {
                        $("#" + s).attr("src", Tabs[s]);
                    }
                } else {
                    $("#" + s).attr("src", Tabs[s]);
                }
            }
        });
    </script>
</head>
<body style="height: auto;">
    <form id="form1" runat="server">
        <div>
            <ul class="tabs" id="tags">
                <li class="current" md="contract"><a>销售合同登记</a></li>
                <li md="consume"><a>配件/耗材更换维修记录</a></li>
                <li md="nutrition"><a>增值系列产品登记</a></li>
            </ul>
        </div>
        <div id="tagContent" class="moduleContainer" style="overflow: hidden;">
            <iframe id="contract" src=""
                style="width: 100%; height: 460px; margin: 0px;" scrolling="auto"
                frameborder="0"></iframe>
            <iframe id="consume" src="" style="width: 100%; height: 460px; margin: 0px; display: none;"
                scrolling="auto" frameborder="0"></iframe>
            <iframe id="nutrition" src=""
                style="width: 100%; height: 460px; margin: 0px; display: none;" scrolling="auto"
                frameborder="0"></iframe>
        </div>
    </form>
</body>
</html>
